package org.dlust.springbootbasic;

import org.dlust.springbootbasic.config.EmailsConfig;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
@EnableConfigurationProperties({EmailsConfig.class})
public class SpringbootBasicApplication {

	public static void main(String[] args) {
		ConfigurableApplicationContext ctx = SpringApplication.run(SpringbootBasicApplication.class, args);
		EmailsConfig bean = ctx.getBean(EmailsConfig.class);
		System.out.println(bean.getUser());
	}

}
